package com.ihr360.payroll.model.dto.salary.embeddable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;

/**
 * 统计薪资计算过程中的引用服务的情况
 */
@Embeddable
public class RefServiceStatistics implements Serializable {

    private static final long serialVersionUID = 3335155733726791248L;
    /**
     * 是否引用的社保公积金服务
     */
    @Column(nullable = true)
    private Boolean refSihf;
    /**
     * 是否引用的社保公积金服务
     */
    @Column(nullable = true)
    private Boolean refAttendance;

    /**
     * 是否引用了社保服务
     */
    @Column(nullable = true)
    private Integer sihfNotOkCount;

    /**
     * 是否引用了考勤服务
     */
    @Column(nullable = true)
    private Integer attendanceNotOkCount;

    public Boolean getRefSihf() {
        return refSihf;
    }

    public void setRefSihf(Boolean refSihf) {
        this.refSihf = refSihf;
    }

    public Boolean getRefAttendance() {
        return refAttendance;
    }

    public void setRefAttendance(Boolean refAttendance) {
        this.refAttendance = refAttendance;
    }

    public Integer getSihfNotOkCount() {
        return sihfNotOkCount;
    }

    public void setSihfNotOkCount(Integer sihfNotOkCount) {
        this.sihfNotOkCount = sihfNotOkCount;
    }

    public Integer getAttendanceNotOkCount() {
        return attendanceNotOkCount;
    }

    public void setAttendanceNotOkCount(Integer attendanceNotOkCount) {
        this.attendanceNotOkCount = attendanceNotOkCount;
    }

    public void setAttendanceNotOkCount(int attendanceNotOkCount) {
        this.attendanceNotOkCount = attendanceNotOkCount;
    }

    public void increaseSihfNotOkCount(){
        if (this.sihfNotOkCount==null){
            this.sihfNotOkCount = 0;
        }
        this.sihfNotOkCount++;
    }
    public void increaseAttendanceNotOkCount(){
        if (this.attendanceNotOkCount==null){
            this.attendanceNotOkCount = 0;
        }
        this.attendanceNotOkCount++;
    }

}